﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Lhz.Pp.Business;
using Lhz.Pp.Entity.Database;
using System.Collections.Generic;

namespace Lhz.Pp.Test
{
    [TestClass]
    public class UnitTestAddData
    {
        [TestMethod]
        public void TestMethodAddData()
        {
            var up = new UserProxy();
            up.Delete(up.Query());
            up.Add(new User()
            {
                Username = "admin",
                Password = "123",
                Name = "管理员",
                Phone = "18240090928"
            });
            var ap = new ApplicationProxy();
            ap.Delete(ap.Query());
            ap.Add(new Application()
            {
                Name = "服务中心"
            });
            var ppApplication = new Application()
            {
                Name = "权限平台"
            };
            ap.Add(ppApplication);
            ap.Add(new Application()
            {
                Name = "权限平台子系统A",
                ParentGuid = ppApplication.Guid
            });
            ap.Add(new Application()
            {
                Name = "权限平台子系统B",
                ParentGuid = ppApplication.Guid
            });
            ap.Add(new Application()
            {
                Name = "文件平台"
            });
            ap.Add(new Application()
            {
                Name = "工作流平台"
            });
        }
    }
}
